import request from '@/utils/request'

// 查询商品历史库存列表
export function listHistorystock(query) {
  return request({
    url: '/mall/historystock/list',
    method: 'get',
    params: query
  })
}

// 查询商品历史库存详细
export function getHistorystock(id) {
  return request({
    url: '/mall/historystock/' + id,
    method: 'get'
  })
}

// 新增商品历史库存
export function addHistorystock(data) {
  return request({
    url: '/mall/historystock',
    method: 'post',
    data: data
  })
}

// 修改商品历史库存
export function updateHistorystock(data) {
  return request({
    url: '/mall/historystock',
    method: 'put',
    data: data
  })
}

// 删除商品历史库存
export function delHistorystock(id) {
  return request({
    url: '/mall/historystock/' + id,
    method: 'delete'
  })
}
